package org.t411.api.scrapper;

public class UserProfile {
	public int id = -1;
	public String username = "";
	public UserClass userClass = UserClass.UNKNOW;
	public String registeringDate = "";
	public String lastVisiteDate = "";
	
	public DataSize uploadedTotalData = null;
	public DataSize downloadedTotalData = null;
	public String uploadedDailyData = "";
	public String downloadedDailyData = "";
	public float getRatio() { return (float) (new Double(uploadedTotalData.byteSize) / downloadedTotalData.byteSize); }
	
	@Deprecated
	public void setRatio(float newRatio) { }
	
	public int unreadedMails = -1;
	@Override
	public String toString() {
		return String
				.format("UserProfile\n\tid = %s,\n\tusername = %s,\n\tuserClass = %s,\n\tregisteringDate = %s,\n\tlastVisiteDate = %s,\n\tuploadedTotalData = %s,\n\tdownloadedTotalData = %s,\n\tuploadedDailyData = %s,\n\tdownloadedDailyData = %s,\n\tratio = %s,\n\tunreadedMails = %s",
						id, username, userClass, registeringDate,
						lastVisiteDate, uploadedTotalData, downloadedTotalData,
						uploadedDailyData, downloadedDailyData, getRatio(),
						unreadedMails);
	}
}
